<div class="well-lg">
    <div class="col-md-12">
        <div class="well col-md-3">
            <p><span class="glyphicon glyphicon-tag"></span>Wallet: <?php echo $transaction['Wallet']['name']; ?></p>

            <p><span class="glyphicon glyphicon-user"></span>With: <span
                    class="text-info"><?php echo $transaction['Transaction']['with_who']; ?></span>
            </p>

            <p><span class="glyphicon glyphicon-arrow-right">Revened:
                 <span class="text-info">
                        <?php
                        $re_money = 0;
                        foreach($transaction['ChildTransaction'] as $child) {
                            $re_money = $re_money + $child['money'];
                        }

                            echo number_format($re_money);
                        ?> VNĐ
                 </span></p>

            <p><span
                    class="glyphicon glyphicon-usd"></span>Money:
                <span class="text-danger"><?php echo number_format($transaction['Transaction']['money']); ?>VNĐ</span>
            </p>
        </div>
        <br/><br/><br/>
        <?php if($re_money < $transaction['Transaction']['money']){?>
            <div class="col-md-9">
                <div>
                    <?php echo $this->Form->create('Transaction', array('class' => 'form-horizontal', 'inputDefaults' => array('label' => false))); ?>
                    <div class="form-group">
                        <label class="col-md-3 control-label" for="money">Money Revenue:</label>

                        <div class="col-md-4 input-group">
                            <?php echo $this->Form->input('money', array('class' => 'form-control','placeholder'=>'Money Revenue...')) ?>
                            <span class="input-group-addon">VNĐ</span>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-md-2 col-md-offset-4">
                            <?php echo $this->Form->Submit('Submit', array('class' => 'btn btn-primary')); ?>
                        </div>
                    </div>
                    <?php echo $this->Form->end(); ?>
                </div>
            </div>
        <?php } else { ?>
            <div class="alert alert-success col-md-5 col-md-offset-1">
                <p>Revuned is done!!!</p>
            </div>
        <?php }?>

    </div>

</div>